﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using OnlineLibrary.Linq;
using OnlineLibrary.ViewModels;
using OnlineLibrary.Models;

namespace OnlineLibrary.Controllers
{
    public class NavigationController : Controller
    {
        //
        // GET: /Navigation/

        public ActionResult Index()
        {
            ViewData["Message"] = "Welcome to ASP.NET MVC!";
            return View(ViewData);
        }
        public ActionResult NavigationMenu() 
        {
            //List<string> listName = new List<string>();
            Session.Add("Admin", false);
            Session.Add("Staff", false);
            Session.Add("User", false);
            Session.Add("Guest", true);
            var list = DataProvider.Db.tblResTypes.ToList();
            var viewModel = new NavigationMenuViewModels
            {
                ResType = list
            };
            return View(viewModel);
        }

        /// <summary>
        /// Get all Resource Category in tblResCategory
        /// </summary>
        /// <returns></returns>
        
    }
}
